{% extends "_base.htm" %}

{% block adminbar %}
<div id="adminbar">
<a href="/admin">Admin</a>
</div>
{% endblock adminbar %}

{% block bodycontent %}
<p>{{greeting}}</p>

<div id='adminform' >

Page: 
<ul id='pagelist'>
{% for option in pages %}
<li><a href='/admin/{{option.Title}}'>{{option.Title}}</a></li>
{% endfor %}
</ul>

<div>
<form action="/admin" enctype="multipart/form-data" method="post" name='adminform'>
<p>Title: <input type="text" name='title' value='{{title}}'/></p>
<p>Text: <textarea id='editor' name='content'>{{text}}</textarea></p>
<p>Order: <input type="text" name='order' value='{{order}}'/></p>
<p><input type="submit" value="Submit" /></p>
</form>
</div>

<script type="text/javascript">
	CKEDITOR.replace( 'editor' );
</script>

</div>
{% endblock bodycontent%}
